//
//  HJTeamAvatorView.m
//  project
//
//  Created by jc on 2019/5/8.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJTeamAvatorView.h"
#import "YFJourneyModel.h"
#import "HJChatTextMsgModel.h"

@interface HJTeamAvatorView ()
@property (weak, nonatomic) IBOutlet UIImageView *leftAvator;
@property (weak, nonatomic) IBOutlet UIImageView *rightAvator;

@end//60
@implementation HJTeamAvatorView

-(instancetype)init {
    if (self==[super init]) {
        self = [[NSBundle mainBundle]loadNibNamed:@"HJTeamAvatorView" owner:nil options:nil].firstObject;
        [self layerSubviews];
    }
    return self;
}
-(void)setRecordModel:(YFRecordModel *)recordModel {
    _recordModel = recordModel;
    [self.leftAvator sd_setImageWithURL:[NSURL URLWithString:[HJUserManager getUserModel].avatar]];
    [self.rightAvator sd_setImageWithURL:[NSURL URLWithString:recordModel.userModel.avatar]];
}


-(void)layerSubviews {
    [self.leftAvator rounded:UIRectCornerAllCorners radius:20 borderColor:[UIColor blackColor] borderWidth:1];
    [self.rightAvator rounded:UIRectCornerAllCorners radius:20 borderColor:[UIColor blackColor] borderWidth:1];
}
-(void)setSimpleModel:(HJSimpleModel *)simpleModel {
    _simpleModel = simpleModel;
    [self.leftAvator sd_setImageWithURL:simpleModel.data.user.avatarURL];
    [self.rightAvator sd_setImageWithURL:simpleModel.data.userB.avatarURL];
}
@end
